HTMLModelElement: duration property

The read-only HTMLModelElement property duration indicates the length of the element's model animation, specified in seconds.

Value

A double-precision floating-point value indicating the duration of the model's animation in seconds. If no model data is available, the value NaN is returned. If the element's model resource doesn't have an animation, the value is returned as 0.

Note: A model's currentTime and duration are unaffected by changes to its animation's playbackRate.

Examples

js
const obj = document.createElement("model");
console.log(obj.duration); // NaN

Specifications

No specification found

No specification data found for api.HTMLModelElement.duration.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

See also